
#ifndef ECARX_NET_SIGNAL_STORAGE_POOL
#define ECARX_NET_SIGNAL_STORAGE_POOL

#include "common.h"

#include <unordered_map>
#include <cstring>
#include <optional>

namespace ecarx::transfer::storage {


class SignalPool {

  std::unordered_map<int32_t, Signal> mCache;

public:

  const std::optional<Signal> get(int32_t) const;

  void put(const std::vector<Signal> &,std::vector<int32_t> & changed) ;

  private:
    bool compare(const Signal & newSignal,const Signal& old);
};

} // namespace ecarx::net::storage

#endif
